Add the WayfinderIgnore attribute - #310
Merged
Merged
Conversation
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: joetannenbaum <2702148+joetannenbaum@users.noreply.github.com>
Resolved in |
joetannenbaum
marked this pull request as draft
August 21, 2026 22:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some of what Wayfinder can see should not reach the browser. Marking a declaration with
#[WayfinderIgnore]leaves it out of the generated files: a controller class or action, along with its route helper, form variant, page type and request type, a model, an enum or one of its cases, a broadcast event or channel, and a model's accessors and relations. An array key cannot take an attribute, so a@wayfinder-ignorecomment covers page props, resource payloads and validation rules.Passing unless or when keeps or drops the declaration based on a config key or a callable, which covers what belongs in local builds only, such as a fake source provider. Generation runs per build, so each environment gets its own answer, and a condition that cannot be read leaves the declaration out rather than shipping it.
Attributes from other packages and extra comment tags can be listed in config, and the ignore config is folded into the analysis cache key so a change to it is never served from cache.